<div ng-include="sys_html('common/_header')"></div>
<style>
.fui-footer .btn {
    margin-top: .4rem;
}
	.order_detail .fui-list-inner .title.has-address {
		font-size: .7rem;
		line-height: 1.2rem;
		height: 1.2rem;
		display: block;
	}
	.order_detail .fui-list-inner .text{
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}
	.order_detail .fui-list:before{
		border: 0;
	}
	.order_detail .fui-list_title{
		position: relative;
		display: flex;
		align-items: center;
		line-height: normal;
	}
	/*.order_detail .fui-list_title:before{*/
		/*content: " ";*/
		/*position: absolute;*/
		/*left: 0.5rem;*/
		/*right: 0.5rem;*/
		/*bottom: 0;*/
		/*height: 1px;*/
		/*border-top: 1px solid #ebebeb;*/
		/*color: #D9D9D9;*/
		/*-webkit-transform-origin: 0 0;*/
		/*-ms-transform-origin: 0 0;*/
		/*transform-origin: 0 0;*/
		/*-webkit-transform: scaleY(0.5);*/
		/*-ms-transform: scaleY(0.5);*/
		/*transform: scaleY(0.5);*/
	/*}*/
	.order_detail  .lineblock {
		position: relative;
		overflow: hidden;
	}

	.order_detail  .lineblock:before {
		content: "";
		position: absolute;
		left: .5rem;
		top: 0;
		right: .5rem;
		height: 1px;
		border-top: 1px solid #ebebeb;
		-webkit-transform-origin: 0 100%;
		-ms-transform-origin: 0 100%;
		transform-origin: 0 100%;
		-webkit-transform: scaleY(0.5);
		-ms-transform: scaleY(0.5);
		transform: scaleY(0.5);
	}
</style>
<link rel="stylesheet" type="text/css" href="../addons/jy_weishop/custom/templates/mobile/css/orderdetail.css?v=2.1.5">
	<div class="fui-page cav order_detail">
		<div class="fui-content navbar">
			<!--状态-->
			<div class="order_header" style="padding-top: .76rem; margin-bottom: -.266667rem;">
			  <div ng-if="pagedata.order.status==0 && pagedata.order.upseconds!=0" class="svg-box" ng-init="tool.time_down(pagedata.order.upseconds)">
					<span id="upcircle">
					  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" x="0" y="0" viewBox="0 0 140 140">
						<circle fill="none" stroke="#eaeaea" stroke-width="8" cx="70" cy="70" r="64"></circle>
						<circle fill="none" stroke="#09ba07" stroke-width="8" stroke-miterlimit="1" stroke-dasharray="428, 428" stroke-linecap="round" cx="70" cy="70" r="64">
						  <animate  attributeName="stroke-dashoffset" begin="0s" dur="{{pagedata.order.outseconds}}" from="-{{pagedata.order.fromseconds}}" to="-428" repeatCount="1"></animate>
						</circle>
					  </svg>
					</span>
					<span id="text">{{pagedata.order.upseconds.minute}}:{{pagedata.order.upseconds.second}}</span>
			  </div>
			  <div class="red" style="width:2.6rem;margin:0 auto">
				<i ng-if="pagedata.order.status == 4" class="icon icon-wrong" style="font-size:2.6rem"></i>
				<i ng-if="pagedata.order.status == 3" class="icon icon-success" style="font-size:2.6rem"></i>
				<i ng-if="pagedata.order.status == 2 || pagedata.order.status == 1" class="icon icon-clock" style="font-size:2.6rem"></i>
			  </div>
			  <div class="order_detail_ststus" style="padding:0.3rem;background:none">
					<div class="bold">
						<div style="font-size: 0.85rem;">{{pagedata.order.statustitle}}</div>
					</div>
					<div class="bold">
						<div style="font-size: 0.85rem;">{{pagedata.order.selfnumber2}}</div>
					</div>
					<div class="subtitle">{{pagedata.order.statusdesc}}</div>
			  </div>
			</div>
			
				<div ng-show="pagedata.order.isverify==1 && agedata.order.verifycode && pagedata.order.status!=-1 && pagedata.order.status!=0" class="code_box">
					<div class="img_box order_detail_code">
						<img ng-src="{{pagedata.order.qrcodeimg || '../core/resource/images/nopic.jpg'}" alt="">
					</div>
					<div class="ncs-goods-code" id="qrcode-goodsurl" ng-init="tool.qr(pagedata.order.qrcodeimg,'qrcode-goodsurl',100)"><canvas width="100" height="100"></canvas></div>
					<div class="cav_code">{{pagedata.order.verifycode}}</div>
				</div>
				<div ng-if="pagedata.order.addressid>0" class="fui-list-group noborder" style="display: block;">
						<a ng-show="(pagedata.express || pagedata.order.express.expresssn) && pagedata.order.status > 1 && pagedata.order.sendtype!=0"  class="fui-list" style="background: #fff;" href="javascript:" ng-click="access_json('jy_weishop/order.express//id='+pagedata.order.id)">
							<div class="fui-list-icon">
								<i class="icon icon-daishouhuo1" style="color: #ff5555;"></i>
							</div>
							<div class="fui-list-inner" style="font-size: 0.7rem;height: auto;line-height: 1.2rem;">
								<div class="title" ng-show="!pagedata.express" style='color:#ff5555'>快递公司:{{pagedata.order.express.express_name}}</div>
								<div class="title" ng-show="!pagedata.express" style='color:#999'>快递单号:{{pagedata.order.express.expresssn}}</div>
								<div class="title" ng-show="pagedata.express" style='color:#ff5555'>{{pagedata.express.step}}</div>
								<div class="title" ng-show="pagedata.express" style='color:#999'>{{pagedata.express.time}}</div>
							</div>
							<div class="fui-list-angle"><span class="angle"></span></div>
						</a>
						<a ng-show="pagedata.order.status > 0 && pagedata.order.sendtype>0 && pagedata.order_goods" ng-repeat="sg in pagedata.order_goods" class="fui-list" style="background: #fff;" href="javascript:" ng-click="access_json('jy_weishop/order.express//id='+sg.orderid+'sendtype='+sg.sendtype)">
									<div class="fui-list-icon">
										<i class="icon icon-daishouhuo1" style="color: #ff5555;"></i>
									</div>
									<div class="fui-list-inner" style="font-size: 0.7rem;height: auto;line-height: 1.2rem;">
										<div class="title" ng-show="empty(pagedata.express) && sg.expresscom" style='color:#ff5555'>快递公司:{{sg.expresscom}}</div>
										<div class="title" ng-show="empty(pagedata.express) && empty(sg.expresscom)" style='color:#ff5555'>快递公司:其他快递</div>
										<div class="title" style='color:#999'>快递单号:{{sg.expresssn}}</div>
										<div class="title" ng-show="!empty(pagedata.express)" style='color:#ff5555'>{{pagedata.express.step}}</div>
										<div class="title" ng-show="!empty(pagedata.express)" style='color:#999'>{{pagedata.express.time}}</div>
										
									</div>
									<div class="fui-list-angle"><span class="angle"></span></div>
						</a>
				
					<div class="fui-list" style="background: #fff; padding-top: .8rem;padding-bottom: .83rem;">
						<div class="fui-list-icon">
							   <i class="icon jinyunicon icon-ditu"></i>
						</div>
						<div class="fui-list-inner" style="font-size: 0.7rem;height: auto;">
							<div class="title has-address">{{pagedata.address.name}} {{pagedata.address.mobile}}</div>
							<div class="text"><span class='address'>{{pagedata.order.addresstext}}</span></div>
							<div ng-if="pagedata.self.out_time" class="has-address red">约{{pagedata.self.out_time}}送达</div>
							<a ng-if="pagedata.order.peisong_id>0" href="tel:{{pagedata.peisong.mobile}}" class="subtitle"><i class="icon icon-peisong" style="font-size:0.65rem;color:#ffa000"></i> 配送员: {{pagedata.peisong.title || '无'}}（<i class="icon icon-phone" style="font-size:0.65rem;color:#ffa000"></i>{{pagedata.peisong.mobile || '无'}}）</a>
						</div>
					</div>
				</div>
				<div ng-if="pagedata.order.sendtype==3" class="fui-list-group noborder" style="display: block;">
					<div class="fui-list" style="background: #fff; padding-top: .8rem;padding-bottom: .83rem;">
						<div class="fui-list-icon">
							   <i class="icon jinyunicon icon-shipin"></i>
						</div>
						<div class="fui-list-inner" style="font-size: 0.7rem;height: auto;">
							<div class="title has-address">{{pagedata.self.username}} {{pagedata.self.mobile}}</div>
							<div ng-if="pagedata.self.out_time" class="has-address red">约{{pagedata.self.out_time}}取货</div>
						</div>
					</div>
				</div>
		<!--商品信息-->
		<div class="fui-cell-group">
			<div class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">商品明细</div>
			<div ng-repeat="item in pagedata.goods" class="fui-cell">
					<div class="fui-cell-text">
						{{item.title}}<span ng-if="item.selespename">({{item.selespename}})</span>
					</div>
					<div class="fui-cell-remark noremark">
						<span>￥ {{item.price}} <span class="subtitle" style="margin-left:0.2rem">x{{item.total}} / {{item.unit ||'件'}}<span ng-if="item.weight!='0.00'"> ({{item.weight}}kg)</span></span></span>
					</div>
			</div>
			<div ng-repeat="item in pagedata.gifts" class="fui-cell">
					<div class="fui-cell-text">
						{{item.title}}<span class="fui-label fui-label-danger">赠品</span>
					</div>
					<div class="fui-cell-remark noremark">
						<span class="bold oldprice">￥ {{item.price || '0.00'}}</span> <span class="subtitle" style="margin-left:0.2rem">x1</span>
					</div>
			</div>
			<div class="fui-cell">
					<div class="fui-cell-info">
						<span class="r-f bold" style="color:#000;">共{{pagedata.order.total}}件，小计：<span class="price red">￥{{price(pagedata.order.goodsprice) || '0.00'}}</span></span>
					</div>
			</div>
		</div>
		<!--订单详情-->
		<div class="fui-cell-group">
			<div class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">订单详情</div>
			<div class="fui-cell">
					<div class="fui-cell-info">
						所属{{pagedata.pluginset.storeunit || '商户'}}
					</div>
					<div class="fui-cell-remark noremark" ng-click="pagedata.openLocation(pagedata.order.store);">
						<i class="icon jinyunicon icon-ditu" style="font-size:0.9rem"></i>
						{{pagedata.order.store.merchname || '平台自营'}}({{pagedata.order.store.address}})
					</div>
			</div>
				<div ng-if="pagedata.order.selfnumber" class="fui-cell">
					<div class="fui-cell-info">
						<span style="margin-right: 0.7rem;">{{pagedata.pluginset.caititle}}号</span>
					</div>
					<div class="fui-cell-remark" ng-click="pagedata.selfnumber_verify()">
						{{pagedata.order.selfnumber}}
					</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info">
						<span style="margin-right: 0.7rem;">订单编号</span>{{pagedata.order.ordersn}}
					</div>
					<div class="fui-cell-remark noremark">
					</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info">
						<span style="margin-right:0.7rem;">创建时间</span>{{pagedata.order.createtime}}
					</div>
					<div class="fui-cell-remark noremark">

					</div>
				</div>
				
					<div ng-show='pagedata.order.status>=1 && pagedata.order.paytime > 0' class="fui-cell">
						<div class="fui-cell-info">
							<span style="margin-right: 0.7rem;">支付时间</span>{{pagedata.order.paytime}}
						</div>
						<div class="fui-cell-remark noremark">

						</div>
					</div>
				
						<div ng-show='pagedata.order.sendtime && pagedata.order.sendtype==1 && pagedata.order.isverify!=2 && pagedata.order.status>=2' class="fui-cell">
							<div class="fui-cell-info">
								<span style="margin-right: 0.7rem;">发货时间</span>{{pagedata.order.sendtime}}
							</div>
							<div class="fui-cell-remark noremark">

							</div>
						</div>
				
					<div ng-show='pagedata.order.status==3' class="fui-cell">
						<div class="fui-cell-info">
							<span style="margin-right: 0.7rem;">完成时间</span>{{pagedata.order.finishtime}}
						</div>
						<div class="fui-cell-remark noremark">

						</div>
					</div>
		</div>
		<div ng-show="pagedata.carrier" class="fui-cell-group">
			<div class="fui-cell">
				<div class="fui-cell-info">
					姓名：{{pagedata.carrier.carrier_realname}}
				</div>
				<div class="fui-cell-remark noremark">
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-info">
					电话：{{pagedata.carrier.carrier_mobile}}
				</div>
				<div class="fui-cell-remark noremark">
				</div>
			</div>
		</div>
			<div ng-show="pagedata.order_fields && pagedata.order_data" class="fui-cell-group noborder">	
				<div ng-repeat='(key,value) in pagedata.order_fields' class="fui-cell">
					<div class="fui-cell-label">{{value.tp_name}}</div>
					<div class="fui-cell-info">

					</div>
					<div class="fui-cell-remark noremark">
						
					</div>
				</div>
				
			</div>
			<!-- 虚拟商品信息-->
			<div ng-if="pagedata.order.content" class="fui-cell-group">
					发货内容：{{pagedata.order.content}}
			</div>
		<!--商品小计-->

		<div class="fui-cell-group noborder">
			<div ng-show='pagedata.order.dispatchprice' class="fui-cell">
				<div class="fui-cell-label">配送</div>
				<div class="fui-cell-info">

				</div>
				<div class="fui-cell-remark noremark">
					&yen; {{pagedata.order.dispatchprice}}
				</div>
			</div>
			
			<div ng-show='pagedata.order.lotterydiscountprice && pagedata.order.lotterydiscountprice>0' class="fui-cell">
				<div class="fui-cell-label">抽奖优惠</div>
				<div class="fui-cell-info">

				</div>
				<div class="fui-cell-remark noremark">
					- &yen; {{pagedata.order.lotterydiscountprice}}
				</div>
			</div>
			<div ng-if="pagedata.order.ispackage !=1 && pagedata.order.enough_de_price>0" class="fui-cell">
						<div class="fui-cell-label">满额立减</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{pagedata.order.enough_de_price}}
						</div>
			</div>
				
			<div ng-show='pagedata.order.ispackage !=1 && pagedata.order.coupon_de_price>0' class="fui-cell">
						<div class="fui-cell-label">优惠券优惠</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{pagedata.order.couponprice}}
						</div>
			</div>
			
				
			<div ng-show='pagedata.order.ispackage !=1 && pagedata.order.buyagainprice>0' class="fui-cell">
						<div class="fui-cell-label">重复购买优惠</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{pagedata.order.buyagainprice}}
						</div>
			</div>
			<div ng-show='pagedata.order.ispackage !=1 && pagedata.order.level_de_price>0' class="fui-cell">
						<div class="fui-cell-label">会员优惠</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{price(pagedata.order.level_de_price)}}
						</div>
			</div>
			<div ng-show='pagedata.order.luck_de_price>0' class="fui-cell">
						<div class="fui-cell-label">运势折扣</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{price(pagedata.order.luck_de_price)}}
						</div>
			</div>
			<div ng-show='pagedata.order.ispackage !=1 && pagedata.order.isdiscountprice>0' class="fui-cell">
					<div class="fui-cell-label">促销优惠</div>
					<div class="fui-cell-info">

					</div>
					<div class="fui-cell-remark noremark">
						-&yen; {{pagedata.order.isdiscountprice}}
					</div>
			</div>
			<div ng-show='pagedata.order.ispackage !=1 && pagedata.order.deductprice>0' class="fui-cell">
						<div class="fui-cell-label">积分抵扣</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{pagedata.order.deductprice}}
						</div>
			</div>
			<div ng-show='pagedata.order.ispackage !=1 && pagedata.order.deductcredit2>0' class="fui-cell">
						<div class="fui-cell-label">{pagedata.set.moneytext}}抵扣</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{pagedata.order.deductcredit2}}
						</div>
			</div>
			<div ng-show='pagedata.order.ispackage !=1 && pagedata.order.seckilldiscountprice>0' class="fui-cell">
						<div class="fui-cell-label">秒杀优惠</div>
						<div class="fui-cell-info">

						</div>
						<div class="fui-cell-remark noremark">
							-&yen; {{pagedata.order.seckilldiscountprice}}
						</div>
			</div>
			<div class="fui-cell">
					<div ng-if="pagedata.order.dispatchprice" class="fui-cell-label" style="width: 6rem;">实付费(含配送)</div>
					<div ng-if="!pagedata.order.dispatchprice" class="fui-cell-label" style="width: 6rem;">实付费</div>
					<div class="fui-cell-info">

					</div>
					<div class="fui-cell-remark noremark text-danger">
						 <span style='font-size:.75rem'>&yen; {{pagedata.order.price}}
					</div>
			</div>
			</div>
		</div>
		<div class="fui-footer" style="text-align: right;">
					<div ng-show="pagedata.order.can_cancel" class="btn btn-sm btn-default-o order-cancel" href="javascript:" ng-click="post({id:pagedata.order.id},'jy_weishopmeituan/orderlist/cancel/','id='+pagedata.order.id);">取消订单</div>
					<a class="l-f back" style="line-height: 2.5rem;padding: 0 .5rem;" ng-click="access_json('jy_weishopmeituan/orderlist/');">订单列表</a>
					<a ng-show="pagedata.order.userdeleted!=1 && pagedata.order.status==0 && pagedata.order.paytype!=3 && !pagedata.ispeerpay" class="btn btn-sm btn-red-o"  ng-click="pay_submit({},'//setpay/id='+pagedata.order.id,'jy_weishopmeituan/orderlist/')">支付订单</a>
					<a ng-show="(pagedata.order.userdeleted!=1 && pagedata.order.status==0) && (pagedata.order.paytype==3 || pagedata.ispeerpay)" class="btn btn-sm btn-red-o"  ng-click="pay_submit({},'//setpay/id='+pagedata.order.id,'jy_weishopmeituan/orderlist/')">代付订单</a>
					<div ng-show="pagedata.order.status==3 || pagedata.order.status==-1" class="btn btn-sm btn-default-o order-delete" href="javascript:" ng-click="post({},'delete','id='+pagedata.order.id)">删除订单</div>
				<!--<a ng-show="pagedata.order.status==3 || pagedata.order.iscomment==1" class="btn btn-sm btn-default-o" href="javascript:" ng-click="access_json('jy_weishop/order.comment/comment/id='+pagedata.order.id)">追加评价</a> -->
					<a ng-show="!pagedata.activity && !pagedata.order.refundstate && pagedata.order.status>0 && pagedata.order.isshare == 0" data-nocache="true" class="btn btn-sm btn-default-o" href="javascript:" ng-click="access('jy_weishop/coupon.index/')">领取优惠券</a>
					<div ng-show="pagedata.order.sendtype==1 && pagedata.order.status==2 && !pagedata.order.refundstate" class="btn btn-sm btn-red-o order-finish" href="javascript:" ng-click="post({},'confirm','id='+pagedata.order.id)">确认收货</div>
					<div ng-show="pagedata.order.sendtype==2 && pagedata.order.status==2 && !pagedata.order.refundstate" class="btn btn-sm btn-red-o order-finish" href="javascript:" ng-click="post({},'confirm','id='+pagedata.order.id)">确认{{pagedata.pluginset.qucaititle}}</div>
					<a ng-show="pagedata.order.status==5"  class="btn btn-sm btn-default-o" href="javascript:" ng-click="access_json('jy_weishop/order.refund/detail/orderid='+pagedata.order.id)">查看退款进度</a>
					<a ng-show="!pagedata.order.can_cancel && pagedata.order.can_refund" class="btn btn-sm btn-default-o" href="javascript:" ng-click="access_json('jy_weishop/order.refund/apply/orderid='+pagedata.order.id)" >申请退款</a>
					<!--<a ng-show="pagedata.order.canrefund && pagedata.order.status!=1" data-nocache="true" class="btn btn-sm btn-default-o" href="javascript:" ng-click="access_json('jy_weishop/order.refund//id='+pagedata.order.id)" >申请售后</a>-->
					<div ng-show="pagedata.order.userdeleted==1" class="btn btn-sm btn-default-o order-deleted" href="javascript:" ng-click="post({},'rdelete','id='+pagedata.order.id)">彻底删除订单</div>
					<div ng-show="pagedata.order.userdeleted==1" class="btn btn-sm btn-default-o order-recover" href="javascript:" ng-click="post({},'reset','id='+pagedata.order.id)">恢复订单</div>		
		</div>
		<div class="mask">
			<div class="code_box">
				<p>请将二维码出示给{{pagedata.order.sendtype==1?'配送员':'店员'}}</p>
				<div class="img_box" id="show_verify_ewm">
					
				</div>
				<div class="cav_code" id="show_verify_code"></div>
				<div class="error">
					<p style="padding: 0 1.3rem">温馨提示：为了更好的保护您利益,请不要轻易将您的核销二维码泄露给他人</p>
				</div>
			</div>
		</div>
	</div>
<!-- 关注公众号 -->
<div id="attention" ng-if="pagedata.showqrcode==1">
    <div class="attention-alert">
        <div class="attention-img"><img ng-src="{{tomedia(pagedata.shopset2.logo) || '../core/resource/images/nopic.jpg'}}" alt=""></div>
        <div class="attention-title">亲爱的上帝，为了您能正常的接收物流信息，请您先关注我们的公众号</div>
        <div class="attention-content">
            <div class="col-jy-2" style="text-align: center;"><img ng-src="{{tomedia(pagedata.shopset2.followqrcode) || '../core/resource/images/nopic.jpg'}}" alt=""style="width: 5.35rem"></div>
            <div class="col-jy-2" style="text-align: center;"><img src="../addons/jy_weishop/images/zhiwen.png" style="width: 3.3rem;margin:auto"></div>
            <p >长按指纹识别图中二维码</p>
        </div>
        <i class="icon icon-cuowu" ng-click="pagedata.showqrcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:46%"></i>
    </div>
</div>
<script type="text/javascript">
scope.pagedata.selfnumber_verify=function(){
	
			scope.tool.qr(scope.pagedata.selfnumberurl,'show_verify_ewm',150)
			$('#show_verify_code').text(scope.pagedata.order.selfnumber);
			$('.mask').css({display:'block'});
}		
$('.mask').click(function(){
			$(this).css({display:'none'})
})
scope.pagedata.openLocation=function(item){
	wx.openLocation({
	latitude: item.lat_lng.lat, // 纬度，浮点数，范围为90 ~ -90
	longitude: item.lat_lng.lng, // 经度，浮点数，范围为180 ~ -180。
		name: item.province+item.city+item.district, // 位置名
		address: item.address, // 地址详情说明
		scale: 20, // 地图缩放级别,整形值,范围从1~28。默认为最大
		infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
		success:function(){
			//alert(1111);
		}
	});
}
</script>
